var Xiangmu = new Vue({

    el : '#Xiangmulist',
    data:{
        xiangmutext:'',
        xiangmu : {},
        xiangmulist : [],
        xiangmuleixinglist : [],

        excelxiangmulist:[],//批量导入

        xiangmuId:'',
        editFlag : 0,					// 0:新增，1：修改
        show : false,					// 显示列表是否有数据

        pageIndex : 1,
        pageSize : 10,
        pageCount : 0,
        recordCount : 0,
        inputPageIndexValue : "",
    },
    created : function() {
        var _this = this;



        $(".nav navbar-nav li").removeClass("active");
        $("#nav_xiangmu").addClass("active");


        _this.bindXiangmuList();
        _this.bindXiangmuleixingList();

    },
    methods : {
        toShowJindu : function(ppxiangmuid,ppxiangmuleixing){
                location.href="jindu?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
        },

        gethysj : function(){
            this.xiangmu.meetingtime = $("#hysj").val();
        },

        bindXiangmuleixingList:function (){
            var _this = this;
            layer.open({type:3});
            $.post('/xiangmuleixing/find_all',{
                text:"",
                rdm:Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData!=null){
                    if(ppData.result == '1'){
                        _this.xiangmuleixinglist =ppData.resultContent;

                    }else{
                        layer.alert(ppData.message);
                    }
                }
            },"json");
        },

        bindXiangmuList:function (){
            var _this = this;
            layer.open({type:3});
            $.post("/xiangmu/findAllBypage",{
                xiangmuname :_this.xiangmutext,
                pageindex : _this.pageIndex,
                pagesize : _this.pageSize,
                rdm : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if (ppData != null){
                    if(ppData.result == "1"){
                        var data=ppData.resultContent;


                        if(data.XiangMuList.length > 0){
                            _this.show = true;
                            _this.xiangmulist=data.XiangMuList;

                            var PageInfo = data.PageInfo;
                            _this.pageIndex = PageInfo.pageIndex;
                            _this.recordCount = PageInfo.recordCount;
                            _this.pageCount = PageInfo.pageCount;

                        }else {
                            _this.show = false;
                        }

                    }else{
                        layer.alert(ppData.message);
                    }
                }

            },"json");
        },

        toAdd : function (){
            $('#editXiamguModal').modal();
            $("#myModalLabel_xiamgu").html("新增表决项目");
            this.editFlag = 0;
            this.xiangmu = {};

        },

        addXiangmu:function (){
            var _this = this;
            if(_this.checkInputData()){
                layer.open({type:3});
                $.post('/xiangmu/add',{
                    xiangmuname:$.trim(_this.xiangmu.xiangmuname),
                    xiangmuleixing:$.trim(_this.xiangmu.xiangmuleixing),
                    meetingtime:$.trim(_this.xiangmu.meetingtime),
                    zhuangjiashu:$.trim(_this.xiangmu.zhuangjiashu),
                    tongguoshu:$.trim(_this.xiangmu.tongguoshu),
                    random : Math.random()
                },function(ppData){
                    if(ppData != null){
                        layer.closeAll("loading");

                        if(ppData.result == "1"){
                            layer.open({
                                time:1000,
                                btn:[],
                                content:"新增成功!",
                            });
                            $("#editXiamguModal").modal("hide");
                            _this.bindXiangmuList();
                        }else{
                            layer.alert(ppData.message);
                        }
                    }
                },"json");

            }
        },

        toModify:function (ppxiangmuid){
            $('#editXiamguModal').modal();
            $("#myModalLabel_xiamgu").html("修改");
            this.editFlag = 1;
            this.xiangmu = {};
            this.xiangmuId=ppxiangmuid;

            this.bindXiangmu();
        },

        bindXiangmu:function (){
            var _this = this;
            layer.open({type:3});
            $.post('/xiangmu/find_one', {
                xianmguid : _this.xiangmuId,
                rdm : Math.random()
            },function(ppData) {
                layer.closeAll("loading");
                if(ppData != null){
                    if(ppData.result == "1"){
                        var data = ppData.resultContent;
                        _this.xiangmu = data;
                    }else{
                        layer.alert(ppData.message);
                    }
                }
            },"json");
        },

        modifyXiangmu:function (){
            var _this = this;
            if(_this.checkInputData()){
                layer.open({type:3});

                $.post('/xiangmu/modify',{
                    xianmguid : _this.xiangmuId,
                    xiangmuname:$.trim(_this.xiangmu.xiangmuname),
                    xiangmuleixing:$.trim(_this.xiangmu.xiangmuleixing),
                    meetingtime:$.trim(_this.xiangmu.meetingtime),
                    zhuangjiashu:$.trim(_this.xiangmu.zhuangjiashu),
                    tongguoshu:$.trim(_this.xiangmu.tongguoshu),
                    random : Math.random()
                },function(ppData){
                    if(ppData != null){
                        layer.closeAll("loading");

                        if(ppData.result == "1"){
                            layer.open({
                                time:1000,
                                btn:[],
                                content:"修改成功!",
                            });
                            $("#editXiamguModal").modal("hide");
                            _this.bindXiangmuList();
                        }else{
                            layer.alert(ppData.message);
                        }
                    }
                },"json");

            }
        },

        toDelete:function (ppxiangmuid){
            var _this = this;

            layer.confirm("确定删除该条项目信息吗？",{
                btn : ['是','否']
            },function(){
                layer.open({type:3});

                $.post("/xiangmu/delete", {
                    xianmguid : ppxiangmuid,
                    random : Math.random()
                }, function(ppData) {
                    if (ppData != null) {
                        layer.closeAll("loading");

                        if(ppData.result != "1"){
                            layer.alert(ppData.message);
                        }else{
                            layer.open({
                                time:1000,
                                btn:[],
                                content:"删除成功!",
                            });

                            _this.bindXiangmuList();
                        }
                    }
                },"json");
            })
        },

        toModifyIsactived : function(ppxiangmuid){

            var _this = this;
            layer.open({type:3});
            $.post("/xiangmu/modifyisactived", {
                xiangmuid : ppxiangmuid,
                random : Math.random()
            }, function(ppData) {
                if (ppData != null) {
                    layer.closeAll("loading");

                    if(ppData.result != "1"){
                        layer.alert(ppData.message);
                    }else{
                        layer.open({
                            time:1000,
                            btn:[],
                            content:"设置成功!",
                        });
                        _this.bindXiangmuList();
                    }
                }
            },"json");


        },

        toShowXiangmuDetailList  : function(ppxiangmuid,ppxiangmuleixing){
            this.xiangmuid=ppxiangmuid;
            if(ppxiangmuleixing=="12"){//投放设备纳入
                location.href="shebei?xiangmuid="+this.xiangmuid;
            }
            if(ppxiangmuleixing=="1"){//设备引进
                location.href="yinjin?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="2"){//设备报废
                location.href="baofei?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="3"){//耗材对标
                location.href="haocaiduibiao?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="4"){//专科引进
                location.href="zhuankeyinjin?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="5"){//耗材引进
                location.href="haocaiyinjin?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="6"){//体外诊断
                location.href="tiwaizhenduan?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="7"){//医用耗材
                location.href="yiyonghaocai?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="8"){//带量创新
                location.href="dailiangchuangxin?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="9"){
                location.href="dailiangchuangxin?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="10"){ //体外诊断试剂
                location.href="shiji?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="11"){//医用耗材(和试剂一样)
                location.href="shiji?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="18"){
                location.href="hc1?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="19"){
                location.href="hc2?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="20"){
                location.href="hc3?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="24"||ppxiangmuleixing=="25"||ppxiangmuleixing=="26"||ppxiangmuleixing=="27"||ppxiangmuleixing=="28"||ppxiangmuleixing=="29"){
                location.href="hc45?xiangmuid="+this.xiangmuid;
            }
            // else if(ppxiangmuleixing=="21"){
            //     location.href="hc4?xiangmuid="+this.xiangmuid;
            // }
            // else if(ppxiangmuleixing=="22"){
            //     location.href="hc5?xiangmuid="+this.xiangmuid;
            // }
            else if(ppxiangmuleixing=="17"){//更换产品/增加产品
                location.href="yuxuanhui?xiangmuid="+this.xiangmuid;
            }
        },

        toPrintlList:function (ppxiangmuid,ppxiangmuleixing){
            if(ppxiangmuleixing=="5"){//耗材引进
                location.href="printHaocaiyinjin?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            }else if(ppxiangmuleixing=="6"){//体外诊断
                location.href="printTiwaizhenduan?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            }else if(ppxiangmuleixing=="7"){//医用耗材
                location.href="printYiyonghaocai?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            }else if(ppxiangmuleixing=="10"){//体外诊断试剂
                location.href="printShiji?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            } else if(ppxiangmuleixing=="11"){//医用耗材（和试剂一样）
                location.href="printShiji?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            } else{
                location.href="print?xiangmuid="+ppxiangmuid+"&xiangmuleixing="+ppxiangmuleixing;
            }


        },

        toshowUploadXls : function(ppxiangmuid,ppxiangmuleixing){
            this.xiangmuId=ppxiangmuid;
            $("#uploadModal").modal("show");
            this.getFileUrl("ylsbtp",'2000','xls,xlsx',ppxiangmuleixing);
        },
        getFileUrl : function(ppFolderName,ppFileSize,ppShangChuanWenJianLeiXing,ppxiangmuleixing){
            var _this = this;
            $("#uploadModal-body").load("upload_batch.html?fujianpath=/ylsbtp/"+ppFolderName+"&filesize="+ppFileSize, function(){
                UploadVue.Init(ppShangChuanWenJianLeiXing,ppFileSize+"kb",function(jsonList){
                    if(jsonList.length==0){
                        return;
                    }
                    var filename=jsonList[0].filename;
                    var fileurl=jsonList[0].fileurl;
                    var filesize=jsonList[0].filesize;
                    _this.getFujianValue(fileurl,ppxiangmuleixing);
                    /*                    if(ppxiangmuleixing=="12"){//投放设备纳入
                                            _this.getShebeiValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="1"){//设备引进
                                            _this.getYinjinValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="2"){//设备报废
                                            _this.getBaofeiValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="3"){//耗材对标
                                            _this.getHaocaiduibiaoValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="4"){//专科引进
                                            _this.getZhuankeyinjinValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="5"){//耗材引进
                                            _this.getHaocaiyinjinValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="6"){//体外诊断
                                            _this.getTiwaizhenduanValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="7"){//医用耗材
                                            _this.getYiyonghaocaiValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="8"){//带量创新
                                            _this.getdailiangValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="9"){
                                            _this.getdailiangValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="10"){//体外试剂
                                            _this.getshijiValue(fileurl,ppxiangmuleixing);
                                        }
                                        if(ppxiangmuleixing=="11"){ //医用耗材（和试剂表样式一样）
                                            _this.getshijiValue(fileurl,ppxiangmuleixing);
                                        }*/
                },function(){
                    $("#uploadModal").modal("hide");
                });
            });
        },
        getFujianValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_Fujian",{
                xianmguid : _this.xiangmuId,
                xiangmuleixing : ppxiangmuleixing,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getdailiangValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_dailiangvalue",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        //设备纳入
        getShebeiValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_shebeivalue",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        //设备引进
        getYinjinValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_yinjinvalue",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getBaofeiValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_baofei",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getHaocaiduibiaoValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_haocaiduibiao",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getZhuankeyinjinValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_zhuankeyinjin",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getHaocaiyinjinValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_haocaiyinjin",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getTiwaizhenduanValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_tiwaizhenduan",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getshijiValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_shiji",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        if(ppData.resultContent!=null){
                            _this.excelxiangmulist = ppData.resultContent;
                            _this.importXiangmu(ppxiangmuleixing);
                        }else{
                            layer.alert("没有数据");
                        }
                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },
        getYiyonghaocaiValue : function(ppFileurl,ppxiangmuleixing){
            var _this=this;
            _this.excelxiangmulist=[];
            layer.open({type:3});
            $.post("/import_xiangmu/get_yiyonghaocai",{
                xianmguid : _this.xiangmuId,
                fileurl:ppFileurl,
                random : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if(ppData != null){
                    var mmData = ppData;
                    var result = mmData.result;
                    var message = mmData.message;
                    var data = mmData.resultContent;
                    if(result == "1") {
                        _this.excelxiangmulist = ppData.resultContent;
                        _this.importXiangmu(ppxiangmuleixing);

                    }else{
                        layer.alert(message);
                    }
                }
            },"json");

        },

        importXiangmu : function(ppxiangmuleixing){
            var _this = this;
            layer.confirm("确定要导入所有项目吗？",{
                btn : ["是","否"]
            },function(){
                layer.closeAll("dialog");
                _this.startDaoru(ppxiangmuleixing);
            });
        },

        startDaoru : function(ppxiangmuleixing){
            var _this = this;
            layer.open({type:3});
            //导入设备
            if(ppxiangmuleixing=="12"){
                _this.daoruShebei(0);
            }
            if(ppxiangmuleixing=="1"){
                _this.daoruYinjin(0);
            }
            if(ppxiangmuleixing=="2"){
                _this.daoruBaofei(0);
            }
            if(ppxiangmuleixing=="3"){
                _this.daoruHaocaiduibiao(0);
            }
            if(ppxiangmuleixing=="4"){
                _this.daoruZhuankeyinjin(0);
            }
            if(ppxiangmuleixing=="5"){
                _this.daoruHaocaiyinjin(0);
            }
            if(ppxiangmuleixing=="6"){
                _this.daoruTiwaizhenduan(0);
            }
            if(ppxiangmuleixing=="7"){
                _this.daoruYiyonghaocai(0);
            }
            if(ppxiangmuleixing=="8"){
                _this.daoruDailiang(0);
            }
            if(ppxiangmuleixing=="9"){
                _this.daoruDailiang(0);
            }
            if(ppxiangmuleixing=="10"){
                _this.daoruShiji(0);
            }
            //导入医用耗材（与试剂样式一致）
            if(ppxiangmuleixing=="11"){
                _this.daoruShiji(0);
            }
            else if(ppxiangmuleixing=="13"){//专机专用
                location.href="hc2?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="14"){//招标配套专机专用
                location.href="hc3?xiangmuid="+this.xiangmuid;
            }
            else if(ppxiangmuleixing=="15" || ppxiangmuleixing=="16"){//更换产品/增加产品
                location.href="hc45?xiangmuid="+this.xiangmuid;
            }
        },

        daoruShiji : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_shiji",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                leibie:_this.excelxiangmulist[ppMuluCurrentIndex].类别,
                pinzhongming:_this.excelxiangmulist[ppMuluCurrentIndex].品种名,
                pinzhongxuhao:_this.excelxiangmulist[ppMuluCurrentIndex].品种序号,
                pinpai:_this.excelxiangmulist[ppMuluCurrentIndex].品牌,
                xinghao:_this.excelxiangmulist[ppMuluCurrentIndex].型号,
                pingtaibianma:_this.excelxiangmulist[ppMuluCurrentIndex].平台编码,
                chanpinmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].产品名称,
                chanpinguige:_this.excelxiangmulist[ppMuluCurrentIndex].产品规格,
                chanpinxinghao:_this.excelxiangmulist[ppMuluCurrentIndex].产品型号,
                zhucezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanqiye:_this.excelxiangmulist[ppMuluCurrentIndex].生产企业,
                danwei:_this.excelxiangmulist[ppMuluCurrentIndex].单位,
                pingtaiqingkuang:_this.excelxiangmulist[ppMuluCurrentIndex].平台情况,
                jinkouguochan:_this.excelxiangmulist[ppMuluCurrentIndex].进口国产,
                cankaodanjia:_this.excelxiangmulist[ppMuluCurrentIndex].平台单价,
                gongnengyongtu:_this.excelxiangmulist[ppMuluCurrentIndex].问题情形,
                yibao:_this.excelxiangmulist[ppMuluCurrentIndex].是否医保,
                pinpaiqingkuang:_this.excelxiangmulist[ppMuluCurrentIndex].品牌情况,
                beizhu:_this.excelxiangmulist[ppMuluCurrentIndex].备注,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");
                var message = ppData.message;
                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruShiji(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruYiyonghaocai : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_yiyonghaocai",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                haocaifenlei:_this.excelxiangmulist[ppMuluCurrentIndex].耗材分类,
                pinzhongming:_this.excelxiangmulist[ppMuluCurrentIndex].品种名,
                pinzhongxuhao:_this.excelxiangmulist[ppMuluCurrentIndex].品种序号,
                pinpaixuhao:_this.excelxiangmulist[ppMuluCurrentIndex].品牌序号,
                xinghaoxuhao:_this.excelxiangmulist[ppMuluCurrentIndex].型号序号,
                pingtaibianma:_this.excelxiangmulist[ppMuluCurrentIndex].平台编码,
                chanpinmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].产品名称,
                chanpinguige:_this.excelxiangmulist[ppMuluCurrentIndex].产品规格,
                chanpinxinghao:_this.excelxiangmulist[ppMuluCurrentIndex].产品型号,
                zhucezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanshangpinpai:_this.excelxiangmulist[ppMuluCurrentIndex].生产商品牌,
                shengchanshang:_this.excelxiangmulist[ppMuluCurrentIndex].生产商,
                jijiadanwei:_this.excelxiangmulist[ppMuluCurrentIndex].计价单位,
                pingtaiqingkuang:_this.excelxiangmulist[ppMuluCurrentIndex].平台情况,
                jinkouguochan:_this.excelxiangmulist[ppMuluCurrentIndex].进口国产,
                pingtaidanjia:_this.excelxiangmulist[ppMuluCurrentIndex].平台单价,
                gongnengyongtu:_this.excelxiangmulist[ppMuluCurrentIndex].简要功能用途,
                shifouyibao:_this.excelxiangmulist[ppMuluCurrentIndex].是否医保,
                beizhu:_this.excelxiangmulist[ppMuluCurrentIndex].备注,
                text1:_this.excelxiangmulist[ppMuluCurrentIndex].text1,
                text2:_this.excelxiangmulist[ppMuluCurrentIndex].text2,
                text3:_this.excelxiangmulist[ppMuluCurrentIndex].text3,
                text4:_this.excelxiangmulist[ppMuluCurrentIndex].text4,
                text5:_this.excelxiangmulist[ppMuluCurrentIndex].text5,
                text6:_this.excelxiangmulist[ppMuluCurrentIndex].text6,
                text7:_this.excelxiangmulist[ppMuluCurrentIndex].text7,
                text8:_this.excelxiangmulist[ppMuluCurrentIndex].text8,
                text9:_this.excelxiangmulist[ppMuluCurrentIndex].text9,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");
                var message = ppData.message;
                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruYiyonghaocai(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruTiwaizhenduan : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_tiwaizhenduan",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                pinzhong:_this.excelxiangmulist[ppMuluCurrentIndex].品种,
                pinpai:_this.excelxiangmulist[ppMuluCurrentIndex].品牌,
                zhucezhengmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].试剂注册证名称,
                guige:_this.excelxiangmulist[ppMuluCurrentIndex].规格,
                xinghao:_this.excelxiangmulist[ppMuluCurrentIndex].型号,
                zhucezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanshang:_this.excelxiangmulist[ppMuluCurrentIndex].生产商,
                shifoufengbi:_this.excelxiangmulist[ppMuluCurrentIndex].是否封闭试剂,
                pingtaiqingkuang:_this.excelxiangmulist[ppMuluCurrentIndex].平台情况,
                pingtaibianma:_this.excelxiangmulist[ppMuluCurrentIndex].平台编码,
                jijiadanwei:_this.excelxiangmulist[ppMuluCurrentIndex].计价单位,
                pingtaidanjia:_this.excelxiangmulist[ppMuluCurrentIndex].平台单价,
                jiancexiangmu:_this.excelxiangmulist[ppMuluCurrentIndex].检测项目,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruTiwaizhenduan(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruHaocaiyinjin : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_haocaiyinjin",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                pinzhong:_this.excelxiangmulist[ppMuluCurrentIndex].品种,
                pinpai:_this.excelxiangmulist[ppMuluCurrentIndex].品牌,
                xinghaochaifen:_this.excelxiangmulist[ppMuluCurrentIndex].型号拆分,
                pingtaibianma:_this.excelxiangmulist[ppMuluCurrentIndex].平台编码,
                zhucezhengmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].注册证名称,
                guige:_this.excelxiangmulist[ppMuluCurrentIndex].规格,
                xinghao:_this.excelxiangmulist[ppMuluCurrentIndex].型号,
                zhucezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanshang:_this.excelxiangmulist[ppMuluCurrentIndex].生产商,
                jijiadanwei:_this.excelxiangmulist[ppMuluCurrentIndex].计价单位,
                pingtaiqingkuang:_this.excelxiangmulist[ppMuluCurrentIndex].平台情况,
                pingtaidanjia:_this.excelxiangmulist[ppMuluCurrentIndex].平台单价,
                nanjingshiyibaoma:_this.excelxiangmulist[ppMuluCurrentIndex].南京市医保码,
                gongnengyongtu:_this.excelxiangmulist[ppMuluCurrentIndex].简要功能用途,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruHaocaiyinjin(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruDailiang : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_dailiang",{
                xianmguid : _this.xiangmuId,
                dailiangpici:_this.excelxiangmulist[ppMuluCurrentIndex].带量批次,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                chanpinfeilei:_this.excelxiangmulist[ppMuluCurrentIndex].产品分类,
                zhongbiaobianma:_this.excelxiangmulist[ppMuluCurrentIndex].中标编码,
                chanpinmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].产品名称,
                chanpinguige:_this.excelxiangmulist[ppMuluCurrentIndex].产品规格,
                chanpinxinghao:_this.excelxiangmulist[ppMuluCurrentIndex].产品型号,
                zhecezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanchangjia:_this.excelxiangmulist[ppMuluCurrentIndex].生产厂家,
                danwei:_this.excelxiangmulist[ppMuluCurrentIndex].单位,
                danjia:_this.excelxiangmulist[ppMuluCurrentIndex].单价,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{
                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruDailiang(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        //设备
        daoruShebei : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_shebei",{
                xianmguid : _this.xiangmuId,
                yuanqu:_this.excelxiangmulist[ppMuluCurrentIndex].院区,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                shiyongkeshi:_this.excelxiangmulist[ppMuluCurrentIndex].使用科室,
                shebeimingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].设备名称,
                xinghao:_this.excelxiangmulist[ppMuluCurrentIndex].型号,
                taijianshu:_this.excelxiangmulist[ppMuluCurrentIndex].台件数,
                shengchanchangshang:_this.excelxiangmulist[ppMuluCurrentIndex].生产厂家,
                xuliehao:_this.excelxiangmulist[ppMuluCurrentIndex].序列号,
                qiyongshijian:_this.excelxiangmulist[ppMuluCurrentIndex].启用时间,
                shebeigongsi:_this.excelxiangmulist[ppMuluCurrentIndex].设备投放公司,
                guishu:_this.excelxiangmulist[ppMuluCurrentIndex].现产权归属,
                leibie:_this.excelxiangmulist[ppMuluCurrentIndex].问题类别,
                liyou:_this.excelxiangmulist[ppMuluCurrentIndex].理由,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");
                if (ppData.result == "0") {
                    layer.alert(message);
                }else{
                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){
                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruShebei(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruYinjin : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_yinjin",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                shiyongkeshi:_this.excelxiangmulist[ppMuluCurrentIndex].科室名称,
                shebeimingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].设备名称,
                danjia:_this.excelxiangmulist[ppMuluCurrentIndex].预算单价,
                shuliang:_this.excelxiangmulist[ppMuluCurrentIndex].数量,
                yusuanjine:_this.excelxiangmulist[ppMuluCurrentIndex].预算金额,
                shebeileixing:_this.excelxiangmulist[ppMuluCurrentIndex].设备类型,
                tongyongmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].通用名称,
                beizhu1:_this.excelxiangmulist[ppMuluCurrentIndex].配置理由,
                beizhu:_this.excelxiangmulist[ppMuluCurrentIndex].备注,
                beizhu2:_this.excelxiangmulist[ppMuluCurrentIndex].红,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                       // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruYinjin(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruBaofei : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_baofei",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                shiyongkeshi:_this.excelxiangmulist[ppMuluCurrentIndex].使用科室,
                shebeimingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].设备名称,
                guigexinghao:_this.excelxiangmulist[ppMuluCurrentIndex].规格型号,
                shebeijiazhi:_this.excelxiangmulist[ppMuluCurrentIndex].设备价值,
                shuliang:_this.excelxiangmulist[ppMuluCurrentIndex].数量,
                shengchanchangshang:_this.excelxiangmulist[ppMuluCurrentIndex].生产厂商,
                laiyuan:_this.excelxiangmulist[ppMuluCurrentIndex].来源,
                caigoushijian:_this.excelxiangmulist[ppMuluCurrentIndex].采购时间,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruBaofei(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruHaocaiduibiao : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_haocaiduibiao",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                mingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].名称,
                guige:_this.excelxiangmulist[ppMuluCurrentIndex].规格,
                zhucezhengmingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].注册证名称,
                zhucezhengguige:_this.excelxiangmulist[ppMuluCurrentIndex].注册证规格,
                zhucezhenghao:_this.excelxiangmulist[ppMuluCurrentIndex].注册证号,
                shengchanchangjia:_this.excelxiangmulist[ppMuluCurrentIndex].生产厂家,
                jijiadanwei:_this.excelxiangmulist[ppMuluCurrentIndex].计价单位,
                caigoujia:_this.excelxiangmulist[ppMuluCurrentIndex].采购价,
                shiyongkeshi:_this.excelxiangmulist[ppMuluCurrentIndex].使用科室,
                pingtaibianma:_this.excelxiangmulist[ppMuluCurrentIndex].平台编码,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruHaocaiduibiao(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },
        daoruZhuankeyinjin : function(ppMuluCurrentIndex){
            layer.open({type:3});
            var _this=this;
            var  CurrentIndex = ppMuluCurrentIndex+1;
            layer.open({
                type: 3,
                content: "<div style='font-size:18px;font-weight:bold;padding-top:40px;width:200px;text-align:left;'>正在导入项目<br/>当前进度    "+CurrentIndex+" / "+_this.excelxiangmulist.length+"</div>"
            });

            $.post("/import_xiangmu/import_zhuankeyinjin",{
                xianmguid : _this.xiangmuId,
                xuhao:_this.excelxiangmulist[ppMuluCurrentIndex].序号,
                xuqiukeshi:_this.excelxiangmulist[ppMuluCurrentIndex].需求科室,
                haocaibianhao:_this.excelxiangmulist[ppMuluCurrentIndex].耗材编号,
                xianyong_mingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].现用名称,
                xianyong_guige:_this.excelxiangmulist[ppMuluCurrentIndex].现用规格,
                xianyong_shengchanchangjia:_this.excelxiangmulist[ppMuluCurrentIndex].现用生产厂家,
                xianyong_danjia:_this.excelxiangmulist[ppMuluCurrentIndex].现用单价,
                nigeng_mingcheng:_this.excelxiangmulist[ppMuluCurrentIndex].拟更名称,
                nigeng_guige:_this.excelxiangmulist[ppMuluCurrentIndex].拟更规格,
                nigeng_shengchanchangjia:_this.excelxiangmulist[ppMuluCurrentIndex].拟更生产厂家,
                nigeng_danjia:_this.excelxiangmulist[ppMuluCurrentIndex].拟更单价,
                zhongbiaoxinxi:_this.excelxiangmulist[ppMuluCurrentIndex].中标信息,
                random : Math.random()
            }, function(ppData) {
                layer.closeAll("loading");

                if (ppData.result == "0") {
                    layer.alert(message);
                }else{

                    if(ppMuluCurrentIndex >=_this.excelxiangmulist.length - 1){

                        layer.alert("导入完成！");
                        $("#uploadModal").modal("hide");
                        // _this.bindXiadaList();
                    }else{
                        ppMuluCurrentIndex++;
                        _this.daoruZhuankeyinjin(ppMuluCurrentIndex);
                    }
                }
            },"json")
        },


        //检查数字
        checknum : function(ppNum) {
            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数

            if (regPos.test(ppNum) || regNeg.test(ppNum)) {
                return true;
            } else {
                return false;
            }
        },

        //检查输入信息
        checkInputData : function() {
            var _this = this;

            var xiangmuname = !_this.xiangmu.xiangmuname ? "" : $.trim(_this.xiangmu.xiangmuname);
            if("" == xiangmuname){
                layer.alert("请填写项目名称！");
                return false;
            }

            var xiangmuleixing = !_this.xiangmu.xiangmuleixing ? "" : $.trim(_this.xiangmu.xiangmuleixing);
            if("" == xiangmuleixing){
                layer.alert("请选择项目类型！");
                return false;
            }

            var meetingtime = !_this.xiangmu.meetingtime ? "" : $.trim(_this.xiangmu.meetingtime);
            if("" == meetingtime){
                layer.alert("请选择会议时间！");
                return false;
            }


            var zhuangjiashu = !_this.xiangmu.zhuangjiashu ? "" : $.trim(_this.xiangmu.zhuangjiashu);
            if("" == zhuangjiashu){
                layer.alert("请填写评委人数！");
                return false;
            }
            if (!_this.checknum(zhuangjiashu)) {
                layer.alert("评委人数请填写数字格式！");
                return false;
            }

            var tongguoshu = !_this.xiangmu.tongguoshu ? "" : $.trim(_this.xiangmu.tongguoshu);
            if("" == tongguoshu){
                layer.alert("请填写通过人数！");
                return false;
            }
            if (!_this.checknum(tongguoshu)) {
                layer.alert("通过人数请填写数字格式！");
                return false;
            }

            return true;

        },

        //跳到首页
        SetPageIndex : function(){
            this.pageIndex = 1;
        },
        SetPageEnd : function(){
            this.pageIndex = this.pageCount;
        },
        //上一页
        SetPageIndexPrePage : function(){
            var PrePage = ((this.pageIndex -1) <= 0) ? 1 : (this.pageIndex -1);
            this.pageIndex = PrePage;
        },
        //下一页
        SetPageIndexNextPage : function(){
            var NextPage = ((this.pageIndex +1) >= this.pageCount) ? this.pageCount : (this.pageIndex +1);
            this.pageIndex = NextPage;
        },
        //跳转界面
        JumpPage : function(){
            if(this.inputPageIndexValue <= 1){
                this.inputPageIndexValue = 1;
            }else if(this.inputPageIndexValue >= this.pageCount){
                this.inputPageIndexValue = this.pageCount;
            }
            this.pageIndex = this.inputPageIndexValue;
            this.inputPageIndexValue = '';
        },
    },
    watch :{
        //监控分页情况，刷新列表
        pageIndex : function(){
            this.bindXiangmuList();
        }
    }




});